Getting Started with Varnish Cache by Thijs Feryn

Getting Started with Varnish Cache by Thijs Feryn

Author:Thijs Feryn
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2017-03-16T04:00:00+00:00


You can use this refresh strategy, for example, if you’re an editor of a website. You use an ACL to identify yourself and your requests will never return a cached version of the resource. Every time you update that resource, you immediatly see the updated version. The added value to the end user is that they also see the up-to-date version of that resource, but the result gets cached.

Here’s an example that illustrates the use of req.hash_always_miss:

acl editors { "localhost"; "192.168.55.0"/24; } sub vcl_recv { if (req.http.cache-control ~ "no-cache" && client.ip ~ editors) { set req.hash_always_miss = true; } }

The cherry on the cake here is that this example only forces a miss when the client does a force refresh in the browser.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.